/*
 * This file define a face of block
 * Including coordinate of 4 vertex and normal vector
 * Implement operation of rotate
 */
#ifndef QUAD_H
#define QUAD_H
#include <GL/glut.h>
#include <vector>
#include <iostream>


class Quad
{
private: 
    //Should include 6 arraies, first 4 arraies are vertex of the quad, 
    //and the next array is its normal vector, the last array is the color
    std::vector< std::vector<GLfloat> > vertex;   
                                
public:
    Quad()
    {
        vertex.empty();
        std::cout<<"Initialize Quad\n";
    }
    void addVector(GLfloat* pvector)
    {
        std::vector<GLfloat> vector;
        vector.push_back(pvector[0]);
        vector.push_back(pvector[1]);
        vector.push_back(pvector[2]);
        vertex.push_back(vector);
    }

    void addVector(GLfloat x, GLfloat y, GLfloat z)
    {
        std::vector<GLfloat> vector;
        vector.push_back(x);
        vector.push_back(y);
        vector.push_back(z);
        vertex.push_back(vector);
    }

    void empty()
    {
        vertex.clear();
    }
    int size()
    {
        return vertex.size();
    }

    //debug

    //rotate face;
    void rotateX(GLfloat);
    void rotateY(GLfloat);
    void rotateZ(GLfloat);
    //draw face
    void glDraw();
};

#endif
